package com.maya.screens;

import com.maya.R;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class HowToPlayScreen extends Activity
{
	Resources res = null;
	PreferencesScreen pref = new PreferencesScreen();;
	
	String msg = " ";
	private TextView tv1, tv2, tv3;
	private Button bt;

	
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.how2play);
		
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		
		res = this.getResources();
		
		msg = res.getString(R.string.HowToPlayDesc2, Constants.BASAMAK_SAYISI_KOLAY_DUZEY, Constants.BASAMAK_SAYISI_NORMAL_DUZEY, Constants.BASAMAK_SAYISI_ZOR_DUZEY);		
		tv1 = (TextView)findViewById(R.id.textViewHowToPlay2);
		tv1.setTextAppearance(this, android.R.style.TextAppearance_Small);
		tv1.setText(msg);

		msg = res.getString(R.string.HowToPlayDesc4, Constants.MAX_TAHMIN_SURESI_KOLAY_DUZEY, Constants.MAX_TAHMIN_SURESI_NORMAL_DUZEY, Constants.MAX_TAHMIN_SURESI_ZOR_DUZEY);
		tv2 = (TextView)findViewById(R.id.textViewHowToPlay4);
		tv2.setTextAppearance(this, android.R.style.TextAppearance_Small);
		tv2.setText(msg);
		
		msg = res.getString(R.string.HowToPlayDesc5, Constants.TAHMIN_HAKKI);		
		tv3 = (TextView)findViewById(R.id.textViewHowToPlay5);
		tv3.setText(msg);
		
		bt = (Button)findViewById(R.id.buttonBack);
		bt.setOnClickListener(new OnClickListener()
	    {
	        public void onClick(View v)
	        {
	        	startActivity(new Intent(HowToPlayScreen.this, MainScreen.class));
	        }
	    });	
	}
}